<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
    <script>
        const li5 = document.body.children[0].children[2];

        console.log(li5.nextElementSibling);
        console.log(li5.previousElementSibling);
        console.log(li5.parentElement);
        console.log(li5.parentNode);

        console.log(document.body.children[0].firstElementChild);
        console.log(document.body.children[0].lastElementChild);

    </script>
</body>

</html>